from django.contrib import admin

from .models import *


@admin.register(BookedTicket)
class BookedTicketAdmin(admin.ModelAdmin):
    list_display = list_display_links = ('name', 'flight_id', 'ticket_date', 'class_type', 'seat_number', 'create_time',
                                         'pay_status', 'payment_amount')
    # 可编辑字段
    # list_editable = ['seat_number', 'class_type']

    search_fields = ('name',)

    list_filter = ['flight_id']
